package classicsPrograms;

public class Account {
	double yue = 0;
	
	
	public static void main(String[] args) {
		Account a = new Account();
		new MyThread1(10.0,a).start();
		new MyThread1(30.0,a).start();

	}

}

class MyThread1 extends Thread{
	Account a;
	double yue  ;
	public MyThread1(double yue,Account a){
		this.a = a;
		this.yue = yue;
	}
	public void run(){
		setA();
	}
	public synchronized void setA(){
		a.yue = yue;
	} 
}